package main

import "fmt"

func reverseBits(num uint32) uint32 {
	var result uint32
	var tmp uint32
	for i := 31; i > 0; i-- {
		tmp = num & 1
		num = num >> 1
		tmp = tmp << i
		result = result | tmp
	}
	return result
}

func main() {
	// 00000010100101000001111010011100
	var s uint32 = 964176192
	fmt.Println(reverseBits(s))
}
